Skip to content

chore(test): use a temporary file to not pollute the workspace#1269

Merged
SuperFluffy merged 2 commits intomainfrom
superfluffy/dont-pollute-workspace
Jul 16, 2024
Merged

chore(test): use a temporary file to not pollute the workspace#1269
SuperFluffy merged 2 commits intomainfrom
superfluffy/dont-pollute-workspace

Conversation

@SuperFluffy
Copy link
Contributor

Summary

Uses a temporary file instead of writing to the workspace during smoke tests.

Background

It's bad practice to pollute the workspace when running tests. This change writes the output to a temporary file instead, and ensures that it is cleaned up after exit.

Changes

  • Update the run-smoke-cli recipe in charts/deploy.just to write to a temporary generated by mktemp (without arguments to not run into differences between Darwin/BSD and GNU/Linux)
  • Use a trap to clean up the temporary on EXIT.

Testing

Run just run-smoke-cli, observe that the workspace is clean.

@github-actions github-actions bot added the cd label Jul 14, 2024
@SuperFluffy SuperFluffy force-pushed the superfluffy/dont-pollute-workspace branch from f6d2960 to 4bd1350 Compare July 14, 2024 10:08
@SuperFluffy SuperFluffy marked this pull request as ready for review July 14, 2024 10:09
@SuperFluffy SuperFluffy requested a review from a team as a code owner July 14, 2024 10:09
@SuperFluffy SuperFluffy requested a review from steezeburger July 14, 2024 10:09
@SuperFluffy SuperFluffy added this pull request to the merge queue Jul 16, 2024
Merged via the queue into main with commit 7cd1f5d Jul 16, 2024
@SuperFluffy SuperFluffy deleted the superfluffy/dont-pollute-workspace branch July 16, 2024 09:40
steezeburger added a commit that referenced this pull request Jul 16, 2024
* main:
  chore(test): use a temporary file to not pollute the workspace (#1269)
  chore(sequencer): add mempool benchmarks (#1238)
  fix(bridge-withdrawer)!: fix nonce handling (#1215)
  feat(cli, bridge-withdrawer)!: share code between cli and service (#1270)
steezeburger added a commit that referenced this pull request Jul 19, 2024
* main: (24 commits)
  chore: update `bytes` and `ics23` crates (#1279)
  fix(sequencer): improve and fix instrumentation (#1255)
  feature(charts): hermes chart fixes, bech32 updates, ibc bridge test (#1130)
  chore(cli): remove unused rollup cli code (#1275)
  chore(test): use a temporary file to not pollute the workspace (#1269)
  chore(sequencer): add mempool benchmarks (#1238)
  fix(bridge-withdrawer)!: fix nonce handling (#1215)
  feat(cli, bridge-withdrawer)!: share code between cli and service (#1270)
  feat(cli): add cmd to collect withdrawal events and submit as actions (#1261)
  fix(core, bridge, sequencer)!: dismabiguate return addresses (#1266)
  fix(withdrawer): support withdrawer address that differs from bridge address   (#1262)
  (core, sequencer)!: generate serde traits impls for all protocol protobufs (#1260)
  fix(charts): add resources for sequencer/cometbft (#1254)
  chore(sequencer)!: add metrics (#1248)
  fix(sequencer-utils): fixes issue in `parse_blob` tests (#1243)
  feat(core, proto)!: make bridge unlock memo string (#1244)
  fix(conductor): don't panic during panic (#1252)
  feat(core)!: lowerCamelCase for protobuf json mapping (#1250)
  refactor(bridge-withdrawer)!: refactor startup to a separate subtask and remove balance check from startup (#1190)
  fix: rollup archive node configurations (#1249)
  ...
bharath-123 pushed a commit that referenced this pull request Jul 25, 2024
## Summary
Uses a temporary file instead of writing to the workspace during smoke
tests.

## Background
It's bad practice to pollute the workspace when running tests. This
change writes the output to a temporary file instead, and ensures that
it is cleaned up after exit.

## Changes
- Update the `run-smoke-cli` recipe in `charts/deploy.just` to write to
a temporary generated by `mktemp` (without arguments to not run into
differences between Darwin/BSD and GNU/Linux)
- Use a trap to clean up the temporary on `EXIT`.

## Testing
Run `just run-smoke-cli`, observe that the workspace is clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants